﻿<Window x:Class="WpfAlarmTimer.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:alarm="clr-namespace:WpfAlarmTimer"
        xmlns:res="clr-namespace:WpfAlarmTimer.Resources"
        Title="MainWindow" Height="350" Width="525" Closing="Window_Closing" SizeChanged="Window_SizeChanged">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="2*"/>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid Background="#A0f0f0f0" VerticalAlignment="Stretch" Grid.Column="0">
            <StackPanel VerticalAlignment="Center">
                <TextBlock Height="55" Name="dateTextBlock" Text="08-11-2013" Style="{StaticResource time_text_block}"/>
                <TextBlock Height="76" Name="timeTextBlock" Text="11:37:00"  Style="{StaticResource time_text_block}" FontSize="75"/>
            </StackPanel>
        </Grid>
        <Grid Grid.Column="1" Background="#A0dfdfdf">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="40"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock Name="alamTitleTexBlock" Grid.Column="0" Text="Alarms" TextDecorations="underline" TextAlignment="Center"/>
            <Button Name="addAlarmBtn" Grid.Column="1" Click="addAlarmBtn_Click" Margin="5" Content="{res:Resources r='Add'}"/>
            <ItemsControl Name="alarmControls" ItemsSource="{Binding Alarms}" Grid.Row="1" Grid.ColumnSpan="2">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <alarm:AlarmControl DataContext="{Binding}" Height="50"/>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </Grid>


        <Grid Grid.Column="2" Background="#A0c5c5c5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="40"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock Name="timerTitleTexBlock" Grid.Column="0" Text="Timers" TextDecorations="underline" TextAlignment="Center"/>
            <Button Name="addTimerBtn" Grid.Column="1" Click="addTimerBtn_Click" Margin="5" Content="{res:Resources r='Add'}" />
            <ItemsControl Name="timerControls" ItemsSource="{Binding Timers}" Grid.Row="1" Grid.ColumnSpan="2">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <alarm:TimerControl DataContext="{Binding}" Height="50"/>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </Grid>
    </Grid>
</Window>
